import Vue from 'vue'//引入Vue.js
import Router from 'vue-router'//引入vue-router.js
import New from '@/views/New.vue'//引入New.vue组件
import Hot from '@/views/Hot.vue'//引入Hot.vue组件
import Recommend from '@/views/Recommend.vue'//引入Recommend.vue组件

Vue.use(Router)

export default new Router({
  mode: 'history',//使用history模式
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'new',
      component: New
    },
    {
      path: '/hot',
      name: 'hot',
      component: Hot
    },
    {
      path: '/recommend',
      name: 'recommend',
      component: Recommend
    }
  ]
})

